import { AttrType } from "../../attr/AttrType";
import { BuffType } from "../../buff/const/BuffType";
import { ConditionType } from "../../condition/const/ConditionType";
import { EffectType } from "../../effect/const/EffectType";
import { TriggerType } from "../../trigger/const/TriggerType";
import { SkillData } from "../const/SkillData";
import { TargetType } from "../const/TargetType";

/**
 * 技能配置数据
 */
export class SkillConfig {

    static SkillConfigs: { [skillId: number]: SkillData } = {
        1001: {
            skillId: 1001,
            skillName: "平砍",
            skillDesc: "对目标造成攻击力100%的伤害",
            targetType: TargetType.enemy,
            targetCount: 1,
            cost: 0,
            cooldown: 0,
            triggerDatas: [
                {
                    triggerType: TriggerType.attackStart,
                    conditionDatas: null,
                    effects: [
                        {
                            effectType: EffectType.damage,
                            params: {
                                value: 1
                            }
                        }
                    ],
                    activationCount: 1
                }
            ],
            animation: "att",
            attackDic: 100,
        },
        1002: {
            skillId: 1002,
            skillName: "割裂",
            skillDesc: "对目标造成攻击力80%的伤害，30%概率造成目标流血",
            targetType: TargetType.enemy,
            targetCount: 1,
            cost: 0,
            cooldown: 0,
            triggerDatas: [
                {
                    triggerType: TriggerType.attackStart,
                    conditionDatas: null,
                    effects: [
                        {
                            effectType: EffectType.damage,
                            params: {
                                value: 0.8,
                                damageIndex: 0
                            }
                        }
                    ],
                    activationCount: 1
                },
                {
                    triggerType: TriggerType.hit,
                    conditionDatas: [
                        {
                            conditionType: ConditionType.probability,
                            param: {
                                value: 1
                            },
                        }
                    ],
                    effects: [
                        {
                            effectType: EffectType.addBuff,
                            params: {
                                buffId: 2001,
                                count: 2,
                            }
                        }
                    ],
                    activationCount: 1
                },

            ],
            animation: "skill",
            attackDic: 100
        },
        1003: {
            skillId: 1003,
            skillName: "回风剑",
            skillDesc: "对敌方全体造成200%攻击力伤害",
            targetType: TargetType.enemy,
            targetCount: -1,
            cost: 0,
            cooldown: 2,
            triggerDatas: [
                {
                    triggerType: TriggerType.attackStart,
                    conditionDatas: null,
                    effects: [
                        {
                            effectType: EffectType.damage,
                            params: {
                                value: 2,
                            }
                        }
                    ],
                    activationCount: -2
                }
            ],
            animation: "ultimateskill",
            attackDic: 200
        },
        1004: {
            skillId: 1004,
            skillName: "回生术",
            skillDesc: "为自己治疗30%最大生命",
            targetType: TargetType.self,
            targetCount: 1,
            cost: 0,
            cooldown: 2,
            triggerDatas: [
                {
                    triggerType: TriggerType.attackStart,
                    conditionDatas: null,
                    effects: [
                        {
                            effectType: EffectType.treate,
                            params: {
                                attrType: AttrType.maxHp,
                                value: 0.3,
                            }
                        }
                    ],
                    activationCount: 1
                }
            ],
            animation: "att",
            attackDic: -1
        },

        1005: {
            skillId: 1005,
            skillName: "烈焰冲击",
            skillDesc: "对敌方全体造成3段200%攻击力伤害",
            targetType: TargetType.enemy,
            targetCount: -1,
            cost: 0,
            cooldown: 2,
            triggerDatas: [
                {
                    triggerType: TriggerType.attackStart,
                    conditionDatas: null,
                    effects: [
                        {
                            effectType: EffectType.damage,
                            params: {
                                value: 2,
                                damageIndex: 0
                            }
                        },
                        {
                            effectType: EffectType.damage,
                            params: {
                                value: 2,
                                damageIndex: 1

                            }
                        },
                        {
                            effectType: EffectType.damage,
                            params: {
                                value: 2,
                                damageIndex: 2
                            }
                        }
                    ],
                    activationCount: -2
                }
            ],
            animation: "ultimateskill",
            attackDic: 500
        },
        1006: {
            skillId: 1006,
            skillName: "天火流星",
            skillDesc: "对敌方全体造成300%攻击力伤害,并附带持续2回合的灼烧效果",
            targetType: TargetType.enemy,
            targetCount: -1,
            cost: 0,
            cooldown: 2,
            triggerDatas: [
                {
                    triggerType: TriggerType.attackStart,
                    conditionDatas: null,
                    effects: [
                        {
                            effectType: EffectType.damage,
                            params: {
                                value: 3,
                                damageIndex: 0
                            }
                        },
                    ],
                    activationCount: -2
                },
            ],
            animation: "ultimateskill",
            attackDic: -1,
            skillEffect: "60001",
            pos: "enemy"
        }
    }
}